Previous topicNext topic
Help > Keyword Reference >
PRINTERCOUNT function

Purpose

Retrieve the number of available (installed) printers.

Syntax

ncPrinters& = PRINTERCOUNT

See also

LPRINT ATTACH, PRINTER$, XPRINT ATTACH

Example

FUNCTION PBMAIN

 LOCAL ix AS LONG, sPrinters AS STRING

 FOR ix = 1 TO PRINTERCOUNT

   sPrinters = sPrinters & PRINTER$(NAME, ix) & $CRLF

 NEXT

 MSGBOX sPrinters

END FUNCTION